package Java8实战._5_重构_测试_调试._7_2_模板方法;

import java.util.function.Consumer;

class OnlineBanking {



//    public void processCustomer(int id){
//        Customer customer = Database.getCustomerWithId(id);
//        makeCustomerHappy(customer);
//    }

    public void processCustomer(int id, Consumer<Customer> makeCustomerHappyConsumer){
        Customer customer = Database.getCustomerWithId(id);
        makeCustomerHappyConsumer.accept(customer);
    }

//    abstract void makeCustomerHappy(Customer customer);
}



















